// i.r(t), i.d(t, { default: () => SweepPanoSolid })
import SweepTextureLoader from "../loader/SweepTextureLoader"
import PanoRenderer from "../renderer/PanoRenderer"
class SolidPanoRenderer extends PanoRenderer {
  sweepLoader: SweepTextureLoader
  constructor(e, t) {
    super(e, t), (this.sweepLoader = new SweepTextureLoader(e))
  }
  activateSweep(e) {
    super._activateSweep(e)
    const t = this.sweepListMap.get(e)
    return this.sweepLoader.load(t).then(e => e)
  }
  useTexture(e) {
    const t = this.sweepLoader.useTexture(e)
    return t && super._useTexture(e), t
  }
  freeTexture(e, t = !1) {
    super.freeTexture(e, t), 0 === this.textureUsageCounter[e] && this.sweepLoader.unload(e)
  }
  freeAllTextures(e) {
    this.sweepLoader.unloadAll(e)
  }
}
import ModelDataModule from "./ModelDataModule"
import SweepData from "../data/SweepData"
import SweepPanoModule from "./SweepPanoModule"
import OpenDeferred from "../utils/OpenDeferred"
import resolutionEnum from "../enum/resolution.enum"
export default class SweepPanoSolid extends SweepPanoModule {
  constructor() {
    super(...arguments), (this.name = "sweep-pano")
  }
  async init(e, t) {
    const i = (await t.getModule(ModelDataModule)).getSignedUrls(),
      s = (await t.market.waitForData(SweepData)).getSweepList()
    this.panoRenderer = new SolidPanoRenderer(i, s)
    t.addComponent(this, this.panoRenderer)
  }
  getRenderer() {
    return this.panoRenderer
  }
  resetSweep() {}
  async availableResolution() {
    return resolutionEnum.STANDARD
  }
  async requestResolution() {
    return resolutionEnum.STANDARD
  }
  waitForQueue() {
    return new OpenDeferred().resolve().promise()
  }
  async enableZooming() {
    return !1
  }
}
